package com.hkfg.dao;

import com.hkfg.domain.Product;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductDao {

    /**
     * 查询所有的图片
     * @return
     */
    @Select("select * from pic;")
    public List<Product> list();

    /**
     * 上传一张图片
     * @param product
     * @return
     */
    @Insert("insert into product(img) values(#{img});")
    public Integer save(Product product);


    @Insert("inser into user(headpic) values #{headpic}")
    public int img(String headpic);


}
